#include <stdio.h> 
#include <string.h>

int main(void) 
{ 
    char colors[][7] = {"red", "blue", "yellow", "green", "purple"}; int num_colors = sizeof(colors) / sizeof(colors[0]);

// Sort the colors
for (int i = 0; i < num_colors - 1; i++) {
    for (int j = i + 1; j < num_colors; j++) {
        if (strcmp(colors[i], colors[j]) > 0) {
            char temp[7];
            strcpy(temp, colors[i]);
            strcpy(colors[i], colors[j]);
            strcpy(colors[j], temp);
        }
    }
}

// Print the sorted colors
for (int i = 0; i < num_colors; i++) {
    printf("%s\n", colors[i]);
}

return 0;
}